// 
// modules.js
// 海石后台管理
// 
// 2025/01/06.
//
import {pageSupport} from "@/utils/businessModuleSupport.js"

// 当前模块名称
const name = "角色管理"

// 当前模块类型 0 目录 1 菜单 2 按钮
const type = 1

// 打开方式 1 组件 2 内链 3 外链
const openType = 1

// 页面菜单里的 (按钮)权限
const children = [
    {
        name: "添加",
        code: "add",
        type: 2,
        apis: [
            "/api/SysRole/AddRoleInfo"
        ]
    },
    {
        name: "修改",
        code: "update",
        type: 2,
        apis: [
            "/api/SysRole/UpdateRoleInfo"
        ]
    },
    {
        name: "查询",
        code: "get",
        type: 2,
        apis: [
            "/api/SysRole/GetRolePageList"
        ]
    },
    {
        name: "删除",
        code: "delete",
        type: 2,
        apis: [
            "/api/SysRole/DeleteRoleInfo"
        ]
    },
    {
        name: "权限",
        code: "permission",
        type: 2,
        apis: [
            "/api/SysMenu/GetMenuTreeList",
            "/api/SysRole/GetRolePermissionList",
            "/api/SysRole/UpdateRoleDataPermissions"
        ]
    }
]

// 导出页面
export default (path, parentPath) => pageSupport(name, type, openType, path, parentPath, children)